#include<iostream>
#include"UdpServer.hpp"
#include<memory>

void Usage(std::string proc)
{
    std::cout<<"\n\rUsage:"<<proc<<" serverport[1024+]"<<std::endl;
}
// server serverport
int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(1);
    }
    uint16_t serverport=std::stoi(argv[1]);
    std::unique_ptr<UdpServer> ptr(new UdpServer(serverport));
    ptr->Initialize();
    ptr->Start();
    return 0;
}